<template>
  <main class="decision_model_train_container">
    <header class="flex flex-between header">
      <h2>模型训练/任务规划模型</h2>
      <p class="flex flex-between" @click="goBack">
        <i class="el-icon-back"></i>
        返回
      </p>
    </header>
    <header class="flex flex-between">
      <div class="flex" style="color: #fff;">
        <el-button
          type="primary"
          size="small"
          style="margin-right:10px"
          @click="onSubmit('选择任务案例训练集')"
          >选择训练集</el-button
        >
        <el-input
          size="small"
          style="margin: 0 10px"
          v-model="trainName"
          readonly
        ></el-input>
        <el-button
          type="primary"
          size="small"
          @click="onSubmit('选择任务案例测试集')"
          >选择测试集</el-button
        >
        <el-input
          size="small"
          style="margin: 0 10px"
          v-model="testName"
          readonly
        ></el-input>

        <el-button
          type="primary"
          size="small"
          style="margin-right:10px"
          @click="handleIndicatorWeight"
          >指标树配置</el-button
        >
      </div>
      <el-form
        :inline="true"
        :model="formInline"
        class="demo-form-inline"
        size="small"
      >
        <el-form-item>
          <el-button
            type="primary"
            @click="handleModalSave"
            :disabled="isModelSave"
            >模型保存</el-button
          >
          <el-button
            type="primary"
            :disabled="startMxStaut"
            @click="startedTraining"
            >训练及评估</el-button
          >
        </el-form-item>
      </el-form>
    </header>
    <main class="table_container">
      <el-row>
        <el-col :xs="24" :sm="24" :lg="24">
          <div id="charts-line" class="chartItem"></div>
        </el-col>
      </el-row>

      <el-row :gutter="20">
        <el-col :xs="24" :sm="24" :lg="18">
          <div class="informationStatistics flex-between flex">
            <div
              :class="['circle', footerdata.rwwcl == 0 ? 'orange' : 'green']"
            >
              <p class="statistical_num">{{ footerdata.rwwcl }}</p>
              <p class="title">任务完成率</p>
              <p class="title">权重：{{ znjcJsonStr.rwwcl }}</p>
            </div>
            <div
              :class="['circle', footerdata.gcsxxjz == 0 ? 'orange' : 'green']"
            >
              <p class="statistical_num">{{ footerdata.gcsxxjz }}</p>
              <p class="title">观测时效性均值</p>
              <p class="title">权重：{{ znjcJsonStr.gcsxxjz }}</p>
            </div>
            <div
              :class="['circle', footerdata.gcsxxfc == 0 ? 'orange' : 'green']"
            >
              <p class="statistical_num">{{ footerdata.gcsxxfc }}</p>
              <p class="title">观测时效性方差</p>
              <p class="title">权重：{{ znjcJsonStr.gcsxxfc }}</p>
            </div>
            <div
              :class="['circle', footerdata.wxfzjh == 0 ? 'orange' : 'green']"
            >
              <p class="statistical_num">{{ footerdata.wxfzjh }}</p>
              <p class="title">卫星负载均衡</p>
              <p class="title">权重：{{ znjcJsonStr.wxfzjh }}</p>
            </div>
          </div>
          <div class="informationStatistics flex-between flex">
            <div
              :class="['circle', footerdata.cbjjz == 0 ? 'orange' : 'green']"
            >
              <p class="statistical_num">{{ footerdata.cbjjz }}</p>
              <p class="title">侧摆角均值</p>
              <p class="title">权重：{{ znjcJsonStr.cbjjz }}</p>
            </div>
            <div
              :class="['circle', footerdata.cbjfc == 0 ? 'orange' : 'green']"
            >
              <p class="statistical_num">{{ footerdata.cbjfc }}</p>
              <p class="title">侧摆角方差</p>
              <p class="title">权重：{{ znjcJsonStr.cbjfc }}</p>
            </div>
            <div
              :class="['circle', footerdata.tygdjjz == 0 ? 'orange' : 'green']"
            >
              <p class="statistical_num">{{ footerdata.tygdjjz }}</p>
              <p class="title">太阳高度角均值</p>
              <p class="title">权重：{{ znjcJsonStr.tygdjjz }}</p>
            </div>
            <div
              :class="['circle', footerdata.tygdjfc == 0 ? 'orange' : 'green']"
            >
              <p class="statistical_num">{{ footerdata.tygdjfc }}</p>
              <p class="title">太阳高度角方差</p>
              <p class="title">权重：{{ znjcJsonStr.tygdjfc }}</p>
            </div>
          </div>
        </el-col>

        <el-col :xs="24" :sm="24" :lg="6">
          <div class="informationStatistics">
            <div class="circle single-height yellow">
              <div>
                <p class="statistical_num">{{ footerdata.final }}</p>
                <p class="title">结果</p>
              </div>
            </div>
          </div>
        </el-col>
      </el-row>
    </main>
    <proces
      :dialogTitle="dialogTitle"
      ref="procesRef"
      @completeCallback="completeCallback"
    ></proces>

    <flow ref="flowPath" @weightCallback="weightCallback" />

    <save-model ref="modelRef" @missionCallback="missionCallback" />
  </main>
</template>

<script src="./index.js"></script>
<style lang="scss" src="../../decisionModel/train/index.scss" scoped></style>
